package org.dfrt.own.mapper;

import org.dfrt.own.entity.User;
/**
 * @author zhang
 * ClassName: UserMapper
 * Description: 用户持久层映射
 * date: 2023/10/3 20:32
 * @since JDK 8
 */
public interface  UserMapper {
    /**
     * 根据用户查询对象查询用户
     * @param user
     * @return
     */
   public User findUserByExample(User user);

    /**
     * 添加新用户
     * @param user
     * @return
     */
   public int insertUser(User user);

    /**
     * 查找用户是否存在
     * @param user
     * @return
     */
   public User findUserByUser(User user);


    /**
     * 查找修改的用户名是否被占用
     * @param user
     * @return
     */
    public User findUserByUserName(User user);

    /**
     * 修改用户信息
     * @param userb
     * @return
     */
   public int updateUserInfo(User userb);

    /**
     * 注销用户
     * @param user
     * @return
     */
   public int deletUser(User user);
}
